<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="css/index.css" rel="stylesheet" type="text/css" />
<script src="../../../js/prototype.js" type="text/javascript"></script>
<script src="../../../js/engine.js" type="text/javascript"></script>
<script src="../../../js/public.js" type="text/javascript"></script>
<title>客户信息录入</title>
<script type="text/javascript">
var doInit = function(){
	var callback = function(text){
		var array = eval(text);
		var strArr = []; //高效的拼接字符串
		for (var i in array){
			if(array[i]){
				strArr[i] = "<option value='"+ array[i].value +"'>"+ array[i].name +"</option>"
			}
		}
		$("typeId").innerHTML = $("typeId").innerHTML+strArr.join("");
	};
	LyTools.ajax.ajaxRequest("/ajax.do?cmd=getDictionaryBySn&sn=55",null,null,callback);
}
//window.load = doInit();
</script>
</head>
<body>  <form id="clientForm" name="clientForm" action='client.do' method="post">
<div class="content-right">
  <div class="content-r-pic">
    <div style="margin:5px auto auto 12px;"><img src="../../../images/client.gif" width="138" height="17" /></div>
  </div>

    <div class="content-text">
      <div class="square-order">
        <div style="border:1px solid #cecece;">
          <table width="100%"  border="0" cellpadding="0" cellspacing="0">
            <tr bgcolor="#FFFFFF">
              <td>&nbsp;</td>
            </tr>
          </table>
          <input type="hidden" name="id"  value="$!obj.id">
          <input type="hidden" name="org.apache.struts.taglib.html.TOKEN"  value="$!{token}">
          <input type="hidden" name="cmd"  value="#if(!$!obj.id)save#end#if($!obj.id)update#end">
          <table width="100%"  border="0" cellpadding="0" cellspacing="0">
            <tr  bgcolor="#FFFFFF">
              <td width="13%" height="30" align="center">客户编号</td>
              <td width="36%"><input name="sn" id="sn" type="text" value="$!obj.sn" /></td>
              <td width="22%" align="center">客户名称</td>
              <td width="29%"><input name="name" id="name" type="text" value="$!obj.name" /></td>
            </tr>
            <tr  bgcolor="#FFFFFF">
              <td width="13%" height="30" align="center">名称缩写</td>
              <td width="36%"><input name="shortName" id="shortName" type="text" value="$!obj.shortName" /></td>
              <td align="center">联系电话</td>
              <td><input name="tel" id="tel" type="text" value="$!obj.tel" /></td>
            </tr>
            <tr  bgcolor="#FFFFFF">
              <td width="13%" height="30" align="center">联系地址</td>
              <td width="36%"><input name="address" id="address" type="text" value="$!obj.address" /></td>
              <td align="center">联系电邮</td>
              <td><input name="email" id="email" type="text" value="$!obj.email" /></td>
            </tr>
            <tr  bgcolor="#FFFFFF">
              <td height="30" align="center">公司网站</td>
              <td><input name="homePage" id="homePage" type="text" value="$!obj.homePage" /></td>
              <td align="center">联系人</td>
              <td><input name="linkMan" id="linkMan" type="text" value="$!obj.linkMan" />
              </td>
            </tr>
            <tr  bgcolor="#FFFFFF">
              <td width="13%" height="30" align="center">保证金</td>
              <td width="36%"><input name="assureAmount" id="assureAmount" type="text" value="$!obj.assureAmount" /></td>
              <td align="center">业务员</td>
              <td><select name="salesmanId" id="salesmanId" style="width:157px">
	                  <option value="" selected="selected">请选择...</option>
        		      #foreach($info in $employeeList)
	            		  <option value="$!info.id" #if($!obj.salesman.id==$!info.id)selected="selected"#end>$!info.userName</option>
		              #end
                </select></td>
            </tr>
            <tr  bgcolor="#FFFFFF">
              <td align="center">帐户状态</td>
              <td><select name="status" id="status" style="width:157px">
                  <option value="">请选择...</option>
                  <option value="0" #if($!obj.status==0)selected="selected" #end>待审核</option>
                  <option value="1" #if($!obj.status==1)selected="selected" #end>正常</option>
                  <option value="-1" #if($!obj.status==-1)selected="selected" #end>锁定</option>
                </select></td>
              <td width="22%" align="center">客户类型</td>
              <td width="29%">
                <input name="typeName" type="text" class="form_textmenu" id="typeName"   onClick="ItcastUtil.choiceDictionary('clientTypes','客户类型',function(result){$('typeName').value=result.name;$('typeId').value=result.id;});" value="$!obj.types.name" readonly />
         <input type="hidden" name="typeId" id="typeId" value="$!obj.types.id">
                </td>
            </tr>
            
            <tr  bgcolor="#FFFFFF">
              <td height="150" align="center">客户简介</td>
              <td colspan="3"><textarea name="intro" cols="75" rows="6" id="intro">$!obj.intro</textarea></td>
            </tr>
          </table>
        </div>
        <div class="order-botton">
          <div style="margin:1px auto auto 1px;">
            <table width="100%"  border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td><input type="image" src="../../../images/order_tuo.gif" border="0" /></td>
                <td>&nbsp;</td>
                <td><input type="image" src="../../../images/order_tuo.gif" border="0" onclick="this.form.reset();return false;" /></td>
                <td>&nbsp;</td>
                <td><input type="image" src="../../../images/order_tuo.gif" border="0" onclick="location.href='?cmd=list';return false;" /></td>
              </tr>
            </table>
          </div>
        </div>
      </div>
      
    </div>

 
  <div class="content-bbg"><img src="../../../images/content_bbg.jpg" /></div>
</div> </form>

</body>
</html>
